<template>
  <div class="home">
    <Search></Search>
    <ul class="nav">
      <li>
        <router-link to="/" activeClass="navactive" exact>个性推荐</router-link>
      </li>
      <li>
        <router-link to="/course" activeClass="navactive" exact
          >课程</router-link
        >
      </li>
      <li>
        <router-link to="/tiny" activeClass="navactive" exact
          >微专业</router-link
        >
      </li>
    </ul>
    <router-view />
  </div>
</template>

<script>
import Search from "../components/SearchBar";
export default {
  name: "Home",
  components: {
    Search,
  },
};
</script>

<style scoped>
.nav {
  height: 0.84rem;
  display: flex;
  align-items: center;
  background-color: #fff;
}
.nav li {
  flex: 1;
  text-align: center;
}
.nav a {
  font-size: 0.28rem;
  position: relative;
}
.navactive {
  color: #33b17b !important;
}
.navactive::after {
  content: "";
  display: inline-block;
  width: 100%;
  height: 0.04rem;
  background-color: #33b17b;
  position: absolute;
  bottom: -0.2rem;
  left: 0;
}
</style>
